#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	char a[110];
	char b[110];
	scanf("%s",a);
	scanf("%s",b);
	int lena = strlen(a);
	int lenb = strlen(b);
	int i;
	for(i = 0;i<min(lena,lenb);i++)
	{
		if(a[i]>='A'&&a[i]<='Z') a[i] = a[i]+32;
		if(b[i]>='A'&&b[i]<='Z') b[i] = b[i]+32;
		if(a[i]==b[i]) continue;
		else if(a[i]>b[i])
		{
			//printf("%d %d\n",a[i],b[i]);
			printf("1\n");
			return 0;
		} 
		else 
		{
			printf("-1\n");
			return 0;
		}
	}
//	printf("%d %d\n",lena,lenb);
	if(lena==lenb) printf("0\n");
	else if(lena>lenb) printf("1\n");
	else printf("-1\n");
}
